package com.example.web1012.Dao;

import jdk.nashorn.internal.objects.annotations.Constructor;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @projectName: web10-12
 * @package: com.example.web1012.Dao
 * @className: square
 * @author: Berry Peng
 * @description: 正方形
 * @date: 2022/10/12 08:54
 * @version: 1.0
 */
@Getter
@Setter
@ToString
public class square {
    private String name;
    
    private float height;
    
    private float weight;
    
    private float area;
    
    
    public square(String name, float height, float weight) {
        this.name = name;
        this.height = height;
        this.weight = weight;
        this.area = height * weight;
    }
    
    
    public float area(){
        return this.height * this.weight;
    }
    
}
